package com.chris.blog.controller;

import com.chris.blog.entity.po.InvitePO;
import com.chris.blog.service.InviteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

@Controller
public class InviteController {

    @Autowired
    private InviteService inviteService;

    @GetMapping("invite")
    public String invite(Model model) {
        List<InvitePO> invitePOS = inviteService.findAll();
        model.addAttribute("invites", invitePOS);
        return "page/invite";
    }
}
